home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2006 May / PCWMAY06.iso / Software / Freeware / First Page 2006 3.00 / fp2006-final-3.00-setup.exe / {app} / Iscripts / DHTML - Mouse and Cursor / magic-wand2.izs < prev   
Text File  |  2005-09-02  |  10KB  |  238 lines

  1. <!NOWIZARD>
  2.  
  3. <!TITLE>Magic Wand Cursor II
  4. <!/TITLE>
  5.  
  6. <!BROWSER>IE5+ Opr7+<!/BROWSER>
  7.  
  8. <!DESCRIPTION> This is a milder, less flamboyant version of the Magic Wand Cursor script. Great for people (or their site's visitors) who get dizzy just watching the original!
  9. <!/DESCRIPTION> 
  10.  
  11. <!CATEGORY>mouse and cursor<!/CATEGORY>
  12.  
  13. <!SCRIPT>
  14. <!-- START OF SCRIPT -->
  15. <LAYER NAME="a0" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#ffffff" CLIP="0,0,1,1"></LAYER>
  16. <LAYER NAME="a1" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#fff000" CLIP="0,0,1,1"></LAYER>
  17. <LAYER NAME="a2" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#ffa000" CLIP="0,0,1,1"></LAYER>
  18. <LAYER NAME="a3" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#ff00ff" CLIP="0,0,1,1"></LAYER>
  19. <LAYER NAME="a4" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#00ff00" CLIP="0,0,1,1"></LAYER>
  20. <LAYER NAME="a5" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#FF00FF" CLIP="0,0,1,1"></LAYER>
  21. <LAYER NAME="a6" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#FF0000" CLIP="0,0,1,1"></LAYER>
  22. <LAYER NAME="a7" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#ffffff" CLIP="0,0,2,2"></LAYER>
  23. <LAYER NAME="a8" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#fff000" CLIP="0,0,2,2"></LAYER>
  24. <LAYER NAME="a9" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#ffa000" CLIP="0,0,2,2"></LAYER>
  25. <LAYER NAME="a10" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#ff00ff" CLIP="0,0,2,2"></LAYER>
  26. <LAYER NAME="a11" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#00ff00" CLIP="0,0,2,2"></LAYER>
  27. <LAYER NAME="a12" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#0000ff" CLIP="0,0,2,2"></LAYER>
  28. <LAYER NAME="a13" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#FF0000" CLIP="0,0,2,2"></LAYER>
  29.  
  30.  
  31. <script language="JavaScript">
  32.  
  33. /*
  34. Magic Wand cursor II (By Kurt at kurt.grigg@virgin.net)
  35. Modified and permission granted to Dynamic Drive to feature script in archive
  36. For full source, usage terms, and 100's more DHTML scripts, visit http://dynamicdrive.com
  37. */
  38.  
  39. if (document.all){
  40. with (document){
  41. write('<div id="starsDiv" style="position:absolute;top:0px;left:0px">')
  42. write('<div style="position:relative;width:1px;height:1px;background:#ffffff;font-size:1px;visibility:visible"></div>')
  43. write('<div style="position:relative;width:1px;height:1px;background:#fff000;font-size:1px;visibility:visible"></div>')
  44. write('<div style="position:relative;width:1px;height:1px;background:#ffa000;font-size:1px;visibility:visible"></div>')
  45. write('<div style="position:relative;width:1px;height:1px;background:#ff00ff;font-size:1px;visibility:visible"></div>')
  46. write('<div style="position:relative;width:1px;height:1px;background:#00ff00;font-size:1px;visibility:visible"></div>')
  47. write('<div style="position:relative;width:1px;height:1px;background:#0000ff;font-size:1px;visibility:visible"></div>')
  48. write('<div style="position:relative;width:1px;height:1px;background:#FF0000;font-size:1px;visibility:visible"></div>')
  49. write('<div style="position:relative;width:2px;height:2px;background:#ffffff;font-size:2px;visibility:visible"></div>')
  50. write('<div style="position:relative;width:2px;height:2px;background:#fff000;font-size:2px;visibility:visible"></div>')
  51. write('<div style="position:relative;width:2px;height:2px;background:#ffa000;font-size:2px;visibility:visible"></div>')
  52. write('<div style="position:relative;width:2px;height:2px;background:#ff00ff;font-size:2px;visibility:visible"></div>')
  53. write('<div style="position:relative;width:2px;height:2px;background:#00ff00;font-size:2px;visibility:visible"></div>')
  54. write('<div style="position:relative;width:2px;height:2px;background:#0000ff;font-size:2px;visibility:visible"></div>')
  55. write('<div style="position:relative;width:3px;height:3px;background:#FF0000;font-size:3px;visibility:visible"></div>')
  56. write('</div>')
  57. }
  58. }
  59.  
  60. if (document.layers)
  61. {window.captureEvents(Event.MOUSEMOVE);}
  62. var yBase = 200;
  63. var xBase = 200;
  64. var step = 1;
  65. var currStep = 0;
  66. var Xpos = 1;
  67. var Ypos = 1;
  68.  
  69. if (document.all)
  70. {
  71.   function MoveHandler(){
  72.   Xpos = document.body.scrollLeft+event.x;
  73.   Ypos = document.body.scrollTop+event.y;
  74.   }
  75.   document.onmousemove = MoveHandler;
  76. }
  77.  
  78. else if (document.layers)
  79. {
  80.   function xMoveHandler(evnt){
  81.   Xpos = evnt.pageX;
  82.   Ypos = evnt.pageY;
  83.   }
  84.   window.onMouseMove = xMoveHandler;
  85. }
  86.  
  87. function animateLogo() {
  88. if (document.all)
  89. {
  90.  yBase = window.document.body.offsetHeight/6;
  91.  xBase = window.document.body.offsetWidth/6;
  92. }
  93. else if (document.layers)
  94. {
  95.  yBase = window.innerHeight/8;
  96.  xBase = window.innerWidth/8;
  97. }
  98.  
  99. if (document.all)
  100. {
  101.  for ( i = 0 ; i < starsDiv.all.length ; i++ )
  102.  {
  103.   starsDiv.all[i].style.top = Ypos + yBase*Math.sin((currStep + i*4)/12)*Math.cos(400+currStep/200);
  104.  starsDiv.all[i].style.left = Xpos + xBase*Math.sin((currStep + i*3)/10)*Math.sin(currStep/200);
  105.  }
  106. }
  107.  
  108. else if (document.layers)
  109. {
  110.  for ( j = 0 ; j < 14 ; j++ ) //number of NS layers!
  111.  {
  112.   var templayer="a"+j
  113.   document.layers[templayer].top = Ypos + yBase*Math.sin((currStep + j*4)/12)*Math.cos(400+currStep/200);
  114.   document.layers[templayer].left = Xpos + xBase*Math.sin((currStep + j*3)/10)*Math.sin(currStep/200);
  115.  }
  116. }
  117. currStep+= step;
  118. setTimeout("animateLogo()", 10);
  119. }
  120. animateLogo();
  121. </script>
  122. <!-- END OF SCRIPT -->
  123. <!/SCRIPT>
  124.  
  125. <!PREVIEW>
  126. <!-- START OF SCRIPT -->
  127.  
  128. <LAYER NAME="a0" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#ffffff" CLIP="0,0,1,1"></LAYER>
  129. <LAYER NAME="a1" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#fff000" CLIP="0,0,1,1"></LAYER>
  130. <LAYER NAME="a2" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#ffa000" CLIP="0,0,1,1"></LAYER>
  131. <LAYER NAME="a3" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#ff00ff" CLIP="0,0,1,1"></LAYER>
  132. <LAYER NAME="a4" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#00ff00" CLIP="0,0,1,1"></LAYER>
  133. <LAYER NAME="a5" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#FF00FF" CLIP="0,0,1,1"></LAYER>
  134. <LAYER NAME="a6" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#FF0000" CLIP="0,0,1,1"></LAYER>
  135. <LAYER NAME="a7" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#ffffff" CLIP="0,0,2,2"></LAYER>
  136. <LAYER NAME="a8" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#fff000" CLIP="0,0,2,2"></LAYER>
  137. <LAYER NAME="a9" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#ffa000" CLIP="0,0,2,2"></LAYER>
  138. <LAYER NAME="a10" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#ff00ff" CLIP="0,0,2,2"></LAYER>
  139. <LAYER NAME="a11" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#00ff00" CLIP="0,0,2,2"></LAYER>
  140. <LAYER NAME="a12" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#0000ff" CLIP="0,0,2,2"></LAYER>
  141. <LAYER NAME="a13" LEFT=10 TOP=10 VISIBILITY=SHOW BGCOLOR="#FF0000" CLIP="0,0,2,2"></LAYER>
  142.  
  143.  
  144. <script language="JavaScript">
  145.  
  146. /*
  147. Magic Wand cursor II (By Kurt at kurt.grigg@virgin.net)
  148. Modified and permission granted to Dynamic Drive to feature script in archive
  149. For full source, usage terms, and 100's more DHTML scripts, visit http://dynamicdrive.com
  150. */
  151.  
  152. if (document.all){
  153. with (document){
  154. write('<div id="starsDiv" style="position:absolute;top:0px;left:0px">')
  155. write('<div style="position:relative;width:1px;height:1px;background:#ffffff;font-size:1px;visibility:visible"></div>')
  156. write('<div style="position:relative;width:1px;height:1px;background:#fff000;font-size:1px;visibility:visible"></div>')
  157. write('<div style="position:relative;width:1px;height:1px;background:#ffa000;font-size:1px;visibility:visible"></div>')
  158. write('<div style="position:relative;width:1px;height:1px;background:#ff00ff;font-size:1px;visibility:visible"></div>')
  159. write('<div style="position:relative;width:1px;height:1px;background:#00ff00;font-size:1px;visibility:visible"></div>')
  160. write('<div style="position:relative;width:1px;height:1px;background:#0000ff;font-size:1px;visibility:visible"></div>')
  161. write('<div style="position:relative;width:1px;height:1px;background:#FF0000;font-size:1px;visibility:visible"></div>')
  162. write('<div style="position:relative;width:2px;height:2px;background:#ffffff;font-size:2px;visibility:visible"></div>')
  163. write('<div style="position:relative;width:2px;height:2px;background:#fff000;font-size:2px;visibility:visible"></div>')
  164. write('<div style="position:relative;width:2px;height:2px;background:#ffa000;font-size:2px;visibility:visible"></div>')
  165. write('<div style="position:relative;width:2px;height:2px;background:#ff00ff;font-size:2px;visibility:visible"></div>')
  166. write('<div style="position:relative;width:2px;height:2px;background:#00ff00;font-size:2px;visibility:visible"></div>')
  167. write('<div style="position:relative;width:2px;height:2px;background:#0000ff;font-size:2px;visibility:visible"></div>')
  168. write('<div style="position:relative;width:3px;height:3px;background:#FF0000;font-size:3px;visibility:visible"></div>')
  169. write('</div>')
  170. }
  171. }
  172.  
  173. if (document.layers)
  174. {window.captureEvents(Event.MOUSEMOVE);}
  175. var yBase = 200;
  176. var xBase = 200;
  177. var step = 1;
  178. var currStep = 0;
  179. var Xpos = 1;
  180. var Ypos = 1;
  181.  
  182. if (document.all)
  183. {
  184.   function MoveHandler(){
  185.   Xpos = document.body.scrollLeft+event.x;
  186.   Ypos = document.body.scrollTop+event.y;
  187.   }
  188.   document.onmousemove = MoveHandler;
  189. }
  190.  
  191. else if (document.layers)
  192. {
  193.   function xMoveHandler(evnt){
  194.   Xpos = evnt.pageX;
  195.   Ypos = evnt.pageY;
  196.   }
  197.   window.onMouseMove = xMoveHandler;
  198. }
  199.  
  200. function animateLogo() {
  201. if (document.all)
  202. {
  203.  yBase = window.document.body.offsetHeight/6;
  204.  xBase = window.document.body.offsetWidth/6;
  205. }
  206. else if (document.layers)
  207. {
  208.  yBase = window.innerHeight/8;
  209.  xBase = window.innerWidth/8;
  210. }
  211.  
  212. if (document.all)
  213. {
  214.  for ( i = 0 ; i < starsDiv.all.length ; i++ )
  215.  {
  216.   starsDiv.all[i].style.top = Ypos + yBase*Math.sin((currStep + i*4)/12)*Math.cos(400+currStep/200);
  217.  starsDiv.all[i].style.left = Xpos + xBase*Math.sin((currStep + i*3)/10)*Math.sin(currStep/200);
  218.  }
  219. }
  220.  
  221. else if (document.layers)
  222. {
  223.  for ( j = 0 ; j < 14 ; j++ ) //number of NS layers!
  224.  {
  225.   var templayer="a"+j
  226.   document.layers[templayer].top = Ypos + yBase*Math.sin((currStep + j*4)/12)*Math.cos(400+currStep/200);
  227.   document.layers[templayer].left = Xpos + xBase*Math.sin((currStep + j*3)/10)*Math.sin(currStep/200);
  228.  }
  229. }
  230. currStep+= step;
  231. setTimeout("animateLogo()", 10);
  232. }
  233. animateLogo();
  234. </script>
  235. <!-- END OF SCRIPT -->
  236. <!/PREVIEW>
  237.  
  238. <!RELATED>NONE<!/RELATED>